/**
 * Created by lance on 15/7/15.
 */

//var module1 = new Object(
//    {
//        _count: 0,
//        m1: function () {
//            alert('this is m1');
//        },
//        m2: function () {
//            this._count++;
//            alert('this is m2, and _count is ' + this._count);
//        }
//    }
//);

var module1 = (function () {
    var _count = 0;

    var m1 = function () {
        alert('this is module1.m1');
    };

    var m2 = function () {
        _count++;
        alert('this is module1.m2' + _count);
    };

    var add = function () {
        _count++;
        return _count;
    }

    return {
        m1: m1,
        m2: m2,
        add: add
    };
})();

